<template>
    <div>
        <mt-swipe :auto="4000">
            <mt-swipe-item v-for="(img,index) in imgs" :key="index">
                <a :href="img.url">
                    <img :src="img.img">
                </a>
            </mt-swipe-item>
        </mt-swipe>
    </div>
</template>

<script>
    export default {
        name: "mySwipe",
        props: ['url'],
        data() {
            return {
                imgs: [

                ],//轮播图列表
            }
        },
        created() {
            this.$ajax.get(this.url)
                .then(res=>{
                    console.log(this.url)
                    this.imgs = res.data.message;
                    console.log(this.imgs)
                })
                .catch(err=>{
                    console.log(err)
                })
        },

    }
</script>

<style scoped>
    /*轮播图样式*/
    .mint-swipe {
        max-height: 187px;
    }

    .mint-swipe img {
        height: 100%;
        width: 100%;
    }
</style>